#! /usr/bin/env python
# -*- coding: utf-8 -*-


warn_level = '低风险'
warn_level_key = 4
company_name = '福建优力特材料有限公司'
company_id = '1820379858379681793'
warn_status = '已消警'
warn_status_key = 'extinguished_warn'
deal_status = '处置中'
deal_status_key = 'under_disposal'
start_time = '2025-08-10 00:00:00'
end_time = '2025-08-11 00:00:00'

query_sql = '''
SELECT
	count(*) 
FROM
	hgyq_major_hazard_sources.mw_m_enterprise_risk_warning 
WHERE
	is_deleted = 0 
	AND warn_level = ''' + str(warn_level_key) + '''
	AND create_dept = "''' + company_id + '''" 
	AND warn_status = "''' + warn_status_key + '''" 
	AND disposal_status = "''' + deal_status_key + '''" 
	AND warn_start_time BETWEEN "''' + start_time + '''" 
	AND "''' + end_time + '''"
'''

reset_sql = '''
SELECT
	count(*) 
FROM
	hgyq_major_hazard_sources.mw_m_enterprise_risk_warning 
WHERE
	is_deleted = 0 
	AND create_dept = "''' + company_id + '''" 
'''
